package cn.edu.zut.score.core.convert;

import cn.edu.zut.score.core.dto.response.GroupResponse;
import cn.edu.zut.score.core.entity.Group;
import cn.edu.zut.score.core.entity.Info;
import io.swagger.annotations.ApiModel;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author zby
 * @date 2021/06/28
 */
@ApiModel("小组相关转换器")
@Mapper(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface GroupConvert {

     GroupConvert INSTANCE = Mappers.getMapper(GroupConvert.class);

     GroupResponse group2Response(Group group);

     List<GroupResponse> groups2Responses(List<Group> groups);

     List<Info> groups2Infos(List<Group> groups);
}
